package p270jp.pxv.android.advertisement;

import android.util.SparseIntArray;
import android.view.View;
import androidx.databinding.DataBinderMapper;
import androidx.databinding.DataBindingComponent;
import androidx.databinding.ViewDataBinding;
import java.util.ArrayList;
import java.util.List;
import p072ce.ViewOverlayAdSwitchBindingImpl;
import p072ce.ViewRectangleAdSwitchBindingImpl;
import p072ce.ViewRectangleAdgAutoRotationViewBindingImpl;
import p072ce.ViewYufulightOverlayAdBindingImpl;
import p072ce.ViewYufulightRectangleAdBindingImpl;
import p089d.C2421c;
import p270jp.pxv.android.R;

/* renamed from: jp.pxv.android.advertisement.DataBinderMapperImpl */
/* loaded from: classes2.dex */
public class DataBinderMapperImpl extends DataBinderMapper {

    /* renamed from: a */
    public static final SparseIntArray f18783a;

    static {
        SparseIntArray sparseIntArray = new SparseIntArray(5);
        f18783a = sparseIntArray;
        sparseIntArray.put(R.layout.view_overlay_ad_switch, 1);
        sparseIntArray.put(R.layout.view_rectangle_ad_switch, 2);
        sparseIntArray.put(R.layout.view_rectangle_adg_auto_rotation_view, 3);
        sparseIntArray.put(R.layout.view_yufulight_overlay_ad, 4);
        sparseIntArray.put(R.layout.view_yufulight_rectangle_ad, 5);
    }

    @Override // androidx.databinding.DataBinderMapper
    /* renamed from: a */
    public List<DataBinderMapper> mo4584a() {
        ArrayList arrayList = new ArrayList(2);
        arrayList.add(new androidx.databinding.library.baseAdapters.DataBinderMapperImpl());
        arrayList.add(new p270jp.pxv.android.legacy.DataBinderMapperImpl());
        return arrayList;
    }

    @Override // androidx.databinding.DataBinderMapper
    /* renamed from: b */
    public ViewDataBinding mo4583b(DataBindingComponent fVar, View view, int i) {
        int i2 = f18783a.get(i);
        if (i2 <= 0) {
            return null;
        }
        Object tag = view.getTag();
        if (tag == null) {
            throw new RuntimeException("view must have a tag");
        } else if (i2 != 1) {
            if (i2 != 2) {
                if (i2 != 3) {
                    if (i2 != 4) {
                        if (i2 != 5) {
                            return null;
                        }
                        if ("layout/view_yufulight_rectangle_ad_0".equals(tag)) {
                            return new ViewYufulightRectangleAdBindingImpl(fVar, view);
                        }
                        throw new IllegalArgumentException(C2421c.m7804b("The tag for view_yufulight_rectangle_ad is invalid. Received: ", tag));
                    } else if ("layout/view_yufulight_overlay_ad_0".equals(tag)) {
                        return new ViewYufulightOverlayAdBindingImpl(fVar, view);
                    } else {
                        throw new IllegalArgumentException(C2421c.m7804b("The tag for view_yufulight_overlay_ad is invalid. Received: ", tag));
                    }
                } else if ("layout/view_rectangle_adg_auto_rotation_view_0".equals(tag)) {
                    return new ViewRectangleAdgAutoRotationViewBindingImpl(fVar, new View[]{view});
                } else {
                    throw new IllegalArgumentException(C2421c.m7804b("The tag for view_rectangle_adg_auto_rotation_view is invalid. Received: ", tag));
                }
            } else if ("layout/view_rectangle_ad_switch_0".equals(tag)) {
                return new ViewRectangleAdSwitchBindingImpl(fVar, new View[]{view});
            } else {
                throw new IllegalArgumentException(C2421c.m7804b("The tag for view_rectangle_ad_switch is invalid. Received: ", tag));
            }
        } else if ("layout/view_overlay_ad_switch_0".equals(tag)) {
            return new ViewOverlayAdSwitchBindingImpl(fVar, new View[]{view});
        } else {
            throw new IllegalArgumentException(C2421c.m7804b("The tag for view_overlay_ad_switch is invalid. Received: ", tag));
        }
    }

    @Override // androidx.databinding.DataBinderMapper
    /* renamed from: c */
    public ViewDataBinding mo4582c(DataBindingComponent fVar, View[] viewArr, int i) {
        int i2;
        if (!(viewArr == null || viewArr.length == 0 || (i2 = f18783a.get(i)) <= 0)) {
            Object tag = viewArr[0].getTag();
            if (tag == null) {
                throw new RuntimeException("view must have a tag");
            } else if (i2 != 1) {
                if (i2 != 2) {
                    if (i2 == 3) {
                        if ("layout/view_rectangle_adg_auto_rotation_view_0".equals(tag)) {
                            return new ViewRectangleAdgAutoRotationViewBindingImpl(fVar, viewArr);
                        }
                        throw new IllegalArgumentException(C2421c.m7804b("The tag for view_rectangle_adg_auto_rotation_view is invalid. Received: ", tag));
                    }
                } else if ("layout/view_rectangle_ad_switch_0".equals(tag)) {
                    return new ViewRectangleAdSwitchBindingImpl(fVar, viewArr);
                } else {
                    throw new IllegalArgumentException(C2421c.m7804b("The tag for view_rectangle_ad_switch is invalid. Received: ", tag));
                }
            } else if ("layout/view_overlay_ad_switch_0".equals(tag)) {
                return new ViewOverlayAdSwitchBindingImpl(fVar, viewArr);
            } else {
                throw new IllegalArgumentException(C2421c.m7804b("The tag for view_overlay_ad_switch is invalid. Received: ", tag));
            }
        }
        return null;
    }
}
